﻿<controls:ChildWindow xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                      xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
                      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                      xmlns:controlsToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"
                      x:Class="ASPItalia.ModelVirtualCasting.Silverlight.PrintModelDetails"
                      Style="{StaticResource ModelDetailsChildWindowStyle1}"
                      Loaded="ChildWindow_Loaded"
                      mc:Ignorable="d"
                      d:DesignWidth="629"
                      d:DesignHeight="622.312"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      Padding="100"
                      Width="600"
                      Height="500">
    <controls:ChildWindow.Resources>
        <DataTemplate x:Key="FakeModelsItemTemplate">
            <Border Padding="10"
                    Width="165">
                <Border.Effect>
                    <DropShadowEffect ShadowDepth="3"
                                      Opacity="0.4"
                                      BlurRadius="10" />
                </Border.Effect>
                <Border.Background>
                    <LinearGradientBrush EndPoint="0.5,1"
                                         StartPoint="0.5,0">
                        <GradientStop Color="#FF8B8686"
                                      Offset="1" />
                        <GradientStop Color="White"
                                      Offset="0.916" />
                    </LinearGradientBrush>
                </Border.Background>
                <StackPanel>
                    <Image Source="{Binding Multimedia, Converter={StaticResource FirstImageConverter}}"
                           Height="180"
                           Stretch="UniformToFill" />
                    <TextBlock Text="{Binding FirstName, StringFormat='Nome: {0}'}"
                               TextTrimming="WordEllipsis"
                               Margin="0,5,0,0" />
                    <TextBlock Text="{Binding LastName,  StringFormat='Cognome: {0}'}"
                               TextTrimming="WordEllipsis"
                               Margin="0,5,0,0" />
                </StackPanel>
            </Border>
        </DataTemplate>
    </controls:ChildWindow.Resources>
    <Grid x:Name="LayoutRoot"
          Margin="2">
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="50" />
        </Grid.RowDefinitions>
        <ListBox x:Name="MultimediaList"
                 SelectionChanged="MultimediaList_SelectionChanged"
                 ItemTemplate="{StaticResource FakeModelsItemTemplate}"
                 ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                 Style="{StaticResource SelectedModelListBox}"
                 ItemsSource="{Binding ModelsSelectedList.View}"
                 ItemsPanel="{StaticResource SelectedItemsPanelTemplate}"
                 Width="Auto"
                 HorizontalAlignment="Stretch"
                 Height="Auto"
                 VerticalAlignment="Stretch"/>
        <Button
                Grid.Row="1"
                Height="20"
                Content="Stampa"
                Click="Button_Click" Margin="264,15,228,15" Background="White" Foreground="White" />
    </Grid>
</controls:ChildWindow>